using UnityEngine;
using BehaviorDesigner.Runtime;
using BehaviorDesigner.Runtime.Tasks;
using Gameplay;

public class IsHurt : Conditional
{
    private Character _character;

    public override void OnStart()
    {
        _character = GetComponent<Character>();
    }


	public override TaskStatus OnUpdate()
	{
        if (_character.Damage)
        {
            return TaskStatus.Success;
        }
        else
        {
            return TaskStatus.Failure;
        }
    }
}